## FocusExceptions - MyFocus exceptions
## Copyright (C) January 26, 2005 Erick P. Bodine
## email: erick_bodine@comcast.net
## webaddress

## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or any later version.

## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.

## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

"""
NAME
FocusExceptions

SYNOPSIS
import FocusExceptions

try:
    # do something
    raise FocusExceptions.FatalError, "big bomb out"
    
except FocusExceptions.FatalError, error:
    log.critical("%s" % error.value)

DESCRIPTION
Module containing the MyFocus Exceptions

AUTHOR
Erick P Bodine
"""

__author__ = "$Author: ebodine $"
__date__ = "$Date: 2005-03-13 21:20:46 -0700 (Sun, 13 Mar 2005) $"
__version__ = "$Revision: 7 $"


class Error(Exception):
    """ Base class for exceptions. """
    def __init__(self, value):
        self.value = value
    def __str__(self):
        return `self.value`
    
class FatalError(Error):
    """   """
    def __init__(self, message):
        Error.__init__(self, message)
        
class DuplicateTableName(Error):
    """   """
    def __init__(self, message):
        Error.__init__(self, message)
    
class DatabaseError(Error):
    """   """
    def __init__(self, message):
        Error.__init__(self, message)
